package com.unireport.dbbean;

// Generated 2012-5-2 22:17:44 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * WebjobSyncDef generated by hbm2java
 */
@Entity
@Table(name = "WEBJOB_SYNC_DEF", schema = "DATAMANAGER")
@SequenceGenerator(name="seq_webjob_job_id", sequenceName="seq_webjob_job_id",allocationSize=1)
public class WebjobSyncDef implements java.io.Serializable {

	private int jobId;
	private WebjobSyncWait webjobSyncWait;
	private String jobName;
	private String runType;
	private String runTime;
	private String runDay;
	private int priority;
	private String status;
	private String remark;
	private String queueName;
	private int maxExec;
	private Date lastTime;
	private Integer second;
	private Set<WebjobSyncQueue> webjobSyncQueues = new HashSet(0);
	private Set<WebjobRpRelation> webjobRpRelations = new HashSet(0);
	private Set<WebjobSyncSql> webjobSyncSqls = new HashSet(0);

	public WebjobSyncDef() {
	}

	public WebjobSyncDef(int jobId, String jobName, String runType,
			int priority, String queueName, int maxExec) {
		this.jobId = jobId;
		this.jobName = jobName;
		this.runType = runType;
		this.priority = priority;
		this.queueName = queueName;
		this.maxExec = maxExec;
	}

	public WebjobSyncDef(int jobId, WebjobSyncWait webjobSyncWait,
			String jobName, String runType, String runTime, String runDay,
			int priority, String status, String remark, String queueName,
			int maxExec, Date lastTime, Integer second, Set webjobSyncQueues,
			Set webjobRpRelations, Set webjobSyncSqls) {
		this.jobId = jobId;
		this.webjobSyncWait = webjobSyncWait;
		this.jobName = jobName;
		this.runType = runType;
		this.runTime = runTime;
		this.runDay = runDay;
		this.priority = priority;
		this.status = status;
		this.remark = remark;
		this.queueName = queueName;
		this.maxExec = maxExec;
		this.lastTime = lastTime;
		this.second = second;
		this.webjobSyncQueues = webjobSyncQueues;
		this.webjobRpRelations = webjobRpRelations;
		this.webjobSyncSqls = webjobSyncSqls;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="seq_webjob_job_id")
	@Column(name = "JOB_ID", unique = true, nullable = false, precision = 8, scale = 0)
	public int getJobId() {
		return this.jobId;
	}

	public void setJobId(int jobId) {
		this.jobId = jobId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ID_WAIT")
	public WebjobSyncWait getWebjobSyncWait() {
		return this.webjobSyncWait;
	}

	public void setWebjobSyncWait(WebjobSyncWait webjobSyncWait) {
		this.webjobSyncWait = webjobSyncWait;
	}

	@Column(name = "JOB_NAME", nullable = false, length = 100)
	public String getJobName() {
		return this.jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}

	@Column(name = "RUN_TYPE", nullable = false, length = 10)
	public String getRunType() {
		return this.runType;
	}

	public void setRunType(String runType) {
		this.runType = runType;
	}

	@Column(name = "RUN_TIME", length = 10)
	public String getRunTime() {
		return this.runTime;
	}

	public void setRunTime(String runTime) {
		this.runTime = runTime;
	}

	@Column(name = "RUN_DAY", length = 10)
	public String getRunDay() {
		return this.runDay;
	}

	public void setRunDay(String runDay) {
		this.runDay = runDay;
	}

	@Column(name = "PRIORITY", nullable = false, precision = 8, scale = 0)
	public int getPriority() {
		return this.priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	@Column(name = "STATUS", length = 20)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "REMARK", length = 256)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "QUEUE_NAME", nullable = false, length = 20)
	public String getQueueName() {
		return this.queueName;
	}

	public void setQueueName(String queueName) {
		this.queueName = queueName;
	}

	@Column(name = "MAX_EXEC", nullable = false, precision = 8, scale = 0)
	public int getMaxExec() {
		return this.maxExec;
	}

	public void setMaxExec(int maxExec) {
		this.maxExec = maxExec;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "LAST_TIME", length = 7)
	public Date getLastTime() {
		return this.lastTime;
	}

	public void setLastTime(Date lastTime) {
		this.lastTime = lastTime;
	}

	@Column(name = "SECOND", precision = 8, scale = 0)
	public Integer getSecond() {
		return this.second;
	}

	public void setSecond(Integer second) {
		this.second = second;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "webjobSyncDef" ,targetEntity=WebjobSyncQueue.class)
	public Set getWebjobSyncQueues() {
		return this.webjobSyncQueues;
	}

	public void setWebjobSyncQueues(Set webjobSyncQueues) {
		this.webjobSyncQueues = webjobSyncQueues;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "webjobSyncDef",targetEntity=WebjobRpRelation.class)
	public Set getWebjobRpRelations() {
		return this.webjobRpRelations;
	}

	public void setWebjobRpRelations(Set webjobRpRelations) {
		this.webjobRpRelations = webjobRpRelations;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "webjobSyncDef" ,targetEntity=WebjobSyncSql.class)
	public Set getWebjobSyncSqls() {
		return this.webjobSyncSqls;
	}

	public void setWebjobSyncSqls(Set webjobSyncSqls) {
		this.webjobSyncSqls = webjobSyncSqls;
	}

}
